1. Field of the Invention
The present invention relates generally to a processor capable of enabling/disabling memory access, more particularly, to a low-end microprocessor capable of disabling memory access for a protection area during an application program being running.
2. Description of the Related Art
In electronic equipment such as a portable telephone, a low-end microprocessor is utilized. For example, there can be a case where data set by a user is rewritten against his will when a program downloaded to a portable telephone from a web site (hereinafter referred to as an application program) is executed. When a high-end microprocessor is utilized, it is possible to keep data from destruction by an application program if attaching a level to a memory access right or an executive instruction with placing a main program, an OS for example, at a privilege level.
However, when a low-end microprocessor is substituted for a high-end microprocessor, not only does it result in high cost, but it is also required to reconstruct soft wares including an OS which have been developed from the start and modify a hardware system. Furthermore, a storage capacity for an OS becomes enormous.
Accordingly, it is an object of the present invention to provide a processor capable of enabling/disabling memory access by adding a simple hardware configuration thereto.
In one aspect of the present invention, there is provided a processor comprising: a stack pointer; and an access enable/disable determining circuit, comparing the contents of the stack pointer with a given value to provide a signal enabling/disabling memory access according to the comparison result.
With this configuration, since memory access is enabled or disabled according the depth of stack, for example, by doing such that a stack pointer value is smaller than the given value when the main program stored in advance is running while the stack pointer value is equal to the given value when the application program added by user""s operation is running, a user can access data during the main program running while unable to access data when the application program is running.
Other aspects, objects, and the advantages of the present invention will become apparent from the following detailed description taken in connection with the accompanying drawings.